import { App } from "vue";
import { useUser } from '@/store/user'

export const regPermission = (app: App<Element>) => {
    // console.log("123", app);
    app.directive('permission', {
        mounted(el, binding) {
            const store = useUser();
            // console.log('456', store);
            if (!store.Permissions.includes(binding.value)) {
                el.remove();
            }
        },
    })
}